DROP TABLE IF EXISTS jms_ods.yl_lmdm_sys_network_delivery_r;
CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_network_delivery_r(
 ID bigint comment "",  --NUMBER(11)
 COUNTRY_ID bigint comment "所属国家",  --NUMBER(11)
 PROVINCE_ID bigint comment "省份ID",  --NUMBER(11)
 CITY_ID bigint comment "城市ID",  --NUMBER(11)
 AREA_ID bigint comment "区域ID",  --NUMBER(11)
 ZIP_CODE string comment "邮编",  --NVARCHAR2(20)
 NETWORK_ID bigint comment "网点ID",  --NUMBER(11)
 NETWORK_CODE string comment "网点编码",  --NVARCHAR2(30)
 NETWORK_NAME string comment "网点名称",  --NVARCHAR2(50)
 BUSINESS_PRINCIPAL string comment "业务负责人",  --NVARCHAR2(50)
 CUSTOMER_SERVICE_PRINCIPAL string comment "客服负责人",  --NVARCHAR2(50)
 BUSINESS_TELEPHONE string comment "业务电话",  --NVARCHAR2(20)
 CUSTOMER_SERVICE_TELEPHONE string comment "客服电话",  --NVARCHAR2(500)
 IS_DISPATCH int comment "派件范围",  --NUMBER(6)
 IS_RECEIVING int comment "收件范围",  --NUMBER(6)
 START_BUSINESS_TIME timestamp comment "开始营业时间",  --DATE
 END_BUSINESS_TIME timestamp comment "结束营业时间",  --DATE
 ADDRESS string comment "详细地址",  --NVARCHAR2(100)
 LONGITUDE string comment "经度",  --NVARCHAR2(50)
 LATITUDE string comment "纬度",  --NVARCHAR2(50)
 IS_VISIBILITY int comment "对外可见 1是 2否",  --NUMBER(6)
 IS_ENABLE int comment "是否启用:1启用,2不启用",  --NUMBER(6)
 IS_DELETE int comment "是否删除:1未删除,2已删除",  --NUMBER(6)
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 UPDATE_BY bigint comment "最后更新人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人名称",  --NVARCHAR2(50)
 UPDATE_BY_NAME string comment "最后修改人名称",  --NVARCHAR2(50)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 VERSION string comment "版本号",  --NVARCHAR2(10)
 SORT int comment "排序",  --NUMBER(6)
 LAST_UPDATE_TIME_SYNC timestamp comment "",  --DATE
 DELIVERY_RANGE string comment "派件范围",  --CLOB
 RECEIVING_RANGE string comment "收件范围",  --CLOB
 NON_DR_RANGE string comment "非收派范围",  --CLOB
 PLACE_NAME string comment "场地名称",  --NVARCHAR2(18)
 DISPATCH_CONTACT string comment "调度联系人",  --NVARCHAR2(10)
 DISPATCH_CONTACT_MOBILE string comment "调度联系方式",  --NVARCHAR2(20)
 SIGN_ADDR_RANGE double comment "签卡地址范围"  --NUMBER
 )
 COMMENT '网点派送范围'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_network_delivery_r'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

 MSCK REPAIR TABLE jms_ods.yl_lmdm_sys_network_delivery_r;